/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.winner.lps.modules.app.entity;

import com.winner.lps.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

/**
 * 单位管理Entity
 *
 * @author 程少威
 * @version 2017-04-09
 */
public class AppDepartment extends DataEntity<AppDepartment> {

    private static final long serialVersionUID = 1L;
    private String code;        // 单位编码
    private String name;        // 单位名称
    private String principal;        // 负责人
    private String phone;        // 电话
    private String address;        // 地址
    private String email;        // 邮箱
    private String fax;        // 传真

    public AppDepartment() {
        super();
    }

    public AppDepartment(String id) {
        super(id);
    }

    @Length(min = 1, max = 100, message = "单位编码长度必须介于 1 和 100 之间")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Length(min = 1, max = 100, message = "单位名称长度必须介于 1 和 100 之间")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Length(min = 1, max = 100, message = "负责人长度必须介于 1 和 100 之间")
    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    @Length(min = 1, max = 100, message = "电话长度必须介于 1 和 100 之间")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Length(min = 0, max = 100, message = "地址长度必须介于 0 和 100 之间")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Length(min = 0, max = 100, message = "邮箱长度必须介于 0 和 100 之间")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Length(min = 0, max = 100, message = "传真长度必须介于 0 和 100 之间")
    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

}